package com.fengchao.model.usr;

import com.vdurmont.emoji.Emoji;
import com.vdurmont.emoji.EmojiParser;

import java.util.Date;

public class UsrInfo {


    public UsrInfo(String mobile, String password, String source, String channel, String lastAccessIp, String status, Date createTime) {
        this.mobile = mobile;
        this.password = password;
        this.source = source;
        this.channel = channel;
        this.lastAccessIp = lastAccessIp;
        this.status = status;
        this.createTime = createTime;
    }

    public UsrInfo() {
    }

    private Integer id;

    private String mobile;

    private String password;

    private String nickname;

    private String sex;

    private String email;

    private String headIcon;

    private String userType;

    private Integer districtId;

    private String defaultCity;

    private String personalSignature;

    private String favouriteSongStyle;

    private String source;

    private String channel;

    private String lastAccessIp;

    private String status;

    private Date createTime;

    private Date updateTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password == null ? null : password.trim();
    }

    public String getNickname() {
        return nickname;
    }

    /**
     * nickname emoji
     *
     * @return
     */
    public String getNicknameToEmoji() {
        if (nickname == null) {
            return null;
        }
        return EmojiParser.parseToUnicode(nickname);
    }

    public void setNickname(String nickname) {
        this.nickname = nickname == null ? null : EmojiParser.parseToAliases(nickname).trim();
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex == null ? null : sex.trim();
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email == null ? null : email.trim();
    }

    public String getHeadIcon() {
        return headIcon;
    }

    public void setHeadIcon(String headIcon) {
        this.headIcon = headIcon == null ? null : headIcon.trim();
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType == null ? null : userType.trim();
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source == null ? null : source.trim();
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel == null ? null : channel.trim();
    }

    public String getLastAccessIp() {
        return lastAccessIp;
    }

    public void setLastAccessIp(String lastAccessIp) {
        this.lastAccessIp = lastAccessIp == null ? null : lastAccessIp.trim();
    }

    public String getDefaultCity() {
        return defaultCity;
    }

    public void setDefaultCity(String defaultCity) {
        this.defaultCity = defaultCity;
    }

    public String getPersonalSignature() {
        return personalSignature;
    }

    public String getPersonalSignatureToEmoji() {
        if (personalSignature == null) {
            return null;
        }
        return EmojiParser.parseToUnicode(personalSignature);
    }
    public void setPersonalSignature(String personalSignature) {
        this.personalSignature = EmojiParser.parseToAliases(personalSignature).trim();
    }
    public String getFavouriteSongStyle() {
        return favouriteSongStyle;
    }

    public void setFavouriteSongStyle(String favouriteSongStyle) {
        this.favouriteSongStyle = favouriteSongStyle;
    }


    public String getStatus() {
        return status;
    }

    //状态    ENABLED （可用）  DISABLE（不可用）
    public void setStatus(String status) {
        this.status = status == null ? null : status.trim();
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getDistrictId() {
        return districtId;
    }

    public void setDistrictId(Integer districtId) {
        this.districtId = districtId;
    }
}